# TODO: Add comment
# 
# Author: guochun
###############################################################################



#define sampling method for circle quadrat object
oneSampling.circle=function(quadratOBJ,populationData){
	availible=randomPointSample(quadratOBJ@r*2,quadratOBJ@r*2,populationData@x, populationData@y,populationData@plotdim[1],populationData@plotdim[2])
	subx=populationData@x[availible]
	suby=populationData@y[availible]
	xCenter=attr(availible,"point")[1]+quadratOBJ@r
	yCenter=attr(availible,"point")[2]+quadratOBJ@r
	d=sqrt((subx-xCenter)^2+(suby-yCenter)^2)
	return(availible[which(d<=quadratOBJ@r)])
}


setSampleResult.circle=function(sampleOBJ,selection,populationData){
	return(setSampleResultForquadrat(sampleOBJ,selection,populationData))
}
